package com.example.consumer.controller;

import com.example.api.inter.GetName;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author： Aaron
 * @date： 2022-12-12 10:58
 */
@RestController
@RequestMapping("/getName")
public class getNameController {

    @Reference
    private GetName name;

    @GetMapping
    public String name(){
        return "this is consumer";
    }


    @GetMapping("getName2")
    public String name2(){
        return name.name();
    }
}
